/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * <p>Project: jse2303 - T4</p>
 * <p>Powered by webrx On 2023-07-26 09:26:53</p>
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T4 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Callable<Integer> call = new Thread3(6);
        FutureTask<Integer> ft = new FutureTask<>(call);
        Thread t = new Thread(ft);
        t.start();
        System.out.println(Thread.activeCount());

        Integer n = ft.get();
        System.out.println(n);


    }
}
